#include "iobot.h"

void iobot_scroll(iobot_t* bot, int numlines)
{
	if((int)(bot->scroll + numlines) < 0)
		return;
	if(bot->textwidth == 0)// Expirenced a divide by zero error here sometimes
		return;
	if((bot->scroll < (12288 / bot->textwidth)))
	{
		bot->scroll += numlines;
		bot->dirty_x = 1;
		bot->dirty_y = 1;
		bot->dirty_width = bot->textwidth + 1;
		bot->dirty_height = bot->textheight + 1;
		bot->dirty = 1;
	}
}
